package com.rhb.erp.hr.person.web.struts.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

import com.rhb.erp.hr.department.bean.Department;
import com.rhb.erp.hr.person.bean.Person;
import com.rhb.erp.hr.person.bean.PersonQuery;
import com.rhb.web.struts.form.ListForm;

public class PersonForm extends ListForm {

	// Fields
	private Person person;
	private PersonQuery personQuery;
	
	// default construct
	public PersonForm() {
		person = new Person();
		personQuery = new PersonQuery();
	}
	
	// get, set
	public Person getPerson() {
		return person;
	}

	public void setPerson(Person person) {
		this.person = person;
	}

	public PersonQuery getPersonQuery() {
		return personQuery;
	}

	public void setPersonQuery(PersonQuery personQuery) {
		this.personQuery = personQuery;
	}

	// validate
	public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {

		ActionErrors errors = new ActionErrors();

		if ("add".equalsIgnoreCase(this.getBehavior()) || "edit".equalsIgnoreCase(this.getBehavior())) {
																																																																																									}

		return errors;
	}

}
